public class Test {
    public static void main(String[] args) {
        String str1 = "abc";

        String str2 = "abc";

        System.out.println(str1 == str2);

        String s3 = new String("hello");
        String s4 = new String("hello");
        System.out.println(s3 == s4);
        System.out.println("=======================");

        System.out.println(str1.equals(str2));
        System.out.println(s3 == s4);
        System.out.println(s3.compareTo(s4));

    }
}
